﻿using System;
using System.Drawing;
using System.Windows.Media.Imaging;
using System.Windows.Media;

namespace EMath.Objects {
    // Klasa objektów geometrycznych
    /// <summary>
    /// Class
    /// </summary>
    public class Geometry {
        public double[ ] DANE = new double[ ] { 0, 0, 0, 0, 0, 0, 0, 0 };
        public string[ ] DATA = new string[ ] { "", "" };
        public double pi = Math.PI;
        public void ResetDANE( ) {
            DANE = new double[ ] { 0, 0, 0, 0, 0, 0, 0, 0 };
        }
        public string Strs(double T) {
            return Convert.ToString(T); //.Remove(0, 1);
        }

        #region Figury
        #region Trójkąt
        public string[ ] F_Tro_Load(int TYPE, int TYPS) {
            string[ ] Values = new string[8];
            Values[0] = "Długość (a)";
            switch (TYPE) {
                case 0:
                    switch (TYPS) {
                        case 0:
                            Values[1] = "Długość (b)";
                            Values[2] = "Długość (c)";
                            break;
                        case 1:
                            Values[1] = "Długość (b)";
                            break;
                    }
                    break;
                case 1:
                    Values[6] = "Wysokość (h)";
                    break;
            }
            return Values;
        }
        public string F_Tro_Check(int TYPE, int TYPS) {
            switch (TYPE) {
                case 0:
                    double[ ] DAT = new double[3];
                    switch (TYPS) {
                        case 0:
                            DAT[0] = DANE[0];
                            DAT[1] = DANE[1];
                            DAT[2] = DANE[2];
                            break;
                        case 1:
                            DAT[0] = DANE[0];
                            DAT[1] = DANE[1];
                            DAT[2] = DANE[1];
                            break;
                        case 2:
                            DAT[0] = DANE[0];
                            DAT[1] = DANE[0];
                            DAT[2] = DANE[0];
                            break;
                    }
                    Array.Sort(DAT);
                    if (DAT[0] + DAT[1] <= DAT[2]) {
                        return "Trójkąt nie do skonstuowania!";
                    }
                    break;
                case 1:
                    if (DANE[0] == 0 || DANE[6] == 0) {
                        return "Za mało danych!";
                    }
                    break;
            }
            return "";
        }
        public ImageSource F_Tro_ImageX(bool TYPX, int TYPE, int TYPS) {
            switch (TYPS) {
                case 1:
					return new BitmapImage(new Uri(@"pack://application:,,,/Resources/ImagesG/GI_Tro1.png", UriKind.Absolute));
                case 2:
					return new BitmapImage(new Uri(@"pack://application:,,,/Resources/ImagesG/GI_Tro2.png", UriKind.Absolute));
				default:
					return new BitmapImage(new Uri(@"pack://application:,,,/Resources/ImagesG/GI_Tro0.png", UriKind.Absolute));
            }
        }
        public string[ ] F_Tro_Ob(int TYPE, byte TP = 0, double A = 0, double B = 0, double C = 0) {
            if (A == 0) {
                A = DANE[0];
            }
            if (B == 0) {
                B = DANE[1];
            }
            if (C == 0) {
                C = DANE[2];
            }
            switch (TYPE) {
                case 0:
                    DATA[0] = Strs(A + B + C);
                    DATA[1] = "Ob = a + b + c";
                    DATA[1] = DATA[1] + "\nOb = " + Strs(A) + " + " + Strs(B) + " + " + Strs(C);
                    DATA[1] = DATA[1] + "\nOb = " + Strs(A + B) + " + " + Strs(C);
                    DATA[1] = DATA[1] + "\nOb = " + DATA[0];
                    DATA[1] = DATA[1] + "\n\n$Ob: " + DATA[0];
                    break;
                case 1:
                    DATA[0] = Strs(A + B * 2);
                    DATA[1] = "Ob = a + 2b";
                    DATA[1] = DATA[1] + "\nOb = " + Strs(A) + " + 2•" + Strs(B);
                    DATA[1] = DATA[1] + "\nOb = " + Strs(A) + " + " + Strs(B * 2);
                    DATA[1] = DATA[1] + "\nOb = " + DATA[0];
                    DATA[1] = DATA[1] + "\n\n$Ob: " + DATA[0];
                    break;
                case 2:
                    DATA[0] = Strs(A * 3);
                    DATA[1] = "Ob = 3•a";
                    DATA[1] = DATA[1] + "\nOb = 3•" + Strs(A);
                    DATA[1] = DATA[1] + "\nOb = " + DATA[0];
                    DATA[1] = DATA[1] + "\n\n$Ob: " + DATA[0];
                    break;
            }
            return DATA;
        }
        public string[ ] F_Tro_P(byte TP = 0, double A = 0, double H = 0) {
            if (A == 0) {
                A = DANE[0];
            }
            if (H == 0) {
                H = DANE[6];
            }
            DATA[0] = Strs((A * H) / 2);
            DATA[1] = "P = (a•h):2";
            DATA[1] = DATA[1] + "\nP = (" + Strs(A) + "•" + Strs(H) + "):2";
            DATA[1] = DATA[1] + "\nP = " + Strs(A * H) + ":2";
            DATA[1] = DATA[1] + "\nP = " + DATA[0];
            DATA[1] = DATA[1] + "\n\n$P: " + DATA[0];
            return DATA;
        }
        #endregion
        #region Trapez
        public string[ ] F_Tra_Load(int TYPE) {
            string[ ] Values = new string[8];
            switch (TYPE) {
                case 0:
                    Values[0] = "Długość (a)";
                    Values[1] = "Długość (b)";
                    Values[2] = "Długość (c)";
                    Values[3] = "Długość (d)";
                    break;
                case 1:
                    Values[0] = "Długość (a)";
                    Values[1] = "Długość (b)";
                    Values[6] = "Wysokość (h)";
                    break;
            }
            return Values;
        }
        public string F_Tra_Check(int TYPE) {
            return "";
        }
        public ImageSource F_Tra_ImageX(bool TYPX, int TYPE) {
			return new BitmapImage(new Uri(@"pack://application:,,,/Resources/ImagesG/GI_Tra.png", UriKind.Absolute));
        }
        public string[ ] F_Tra_Ob(byte TP = 0, double A = 0, double B = 0, double C = 0, double D = 0) {
            if (A == 0) {
                A = DANE[0];
            }
            if (B == 0) {
                B = DANE[1];
            }
            if (C == 0) {
                C = DANE[2];
            }
            if (D == 0) {
                D = DANE[3];
            }
            DATA[0] = Strs(A + B + C + D);
            DATA[1] = "Ob = a + b + c + d";
            DATA[1] = DATA[1] + "\nOb = " + Strs(A) + " + " + Strs(B) + " + " + Strs(C) + " + " + Strs(D);
            DATA[1] = DATA[1] + "\nOb = " + Strs(A + B) + " + " + Strs(C) + " + " + Strs(D);
            DATA[1] = DATA[1] + "\nOb = " + Strs(A + B + C) + " + " + Strs(D);
            DATA[1] = DATA[1] + "\nOb = " + DATA[0];
            DATA[1] = DATA[1] + "\n\n$Ob: " + DATA[0];
            return DATA;
        }
        public string[ ] F_Tra_P(byte TP = 0, double A = 0, double B = 0, double H = 0) {
            if (A == 0) {
                A = DANE[0];
            }
            if (B == 0) {
                B = DANE[1];
            }
            if (H == 0) {
                H = DANE[6];
            }
            DATA[0] = Strs((A + B) * H / 2);
            DATA[1] = "P = (a+b)•h:2";
            DATA[1] = DATA[1] + "\nP = (" + Strs(A) + " + " + Strs(B) + ")•" + Strs(H) + ":2";
            DATA[1] = DATA[1] + "\nP = " + Strs(A + B) + "•" + Strs(H) + ":2";
            DATA[1] = DATA[1] + "\nP = " + Strs((A + B) * H) + ":2";
            DATA[1] = DATA[1] + "\nP = " + DATA[0];
            DATA[1] = DATA[1] + "\n\n$P: " + DATA[0];
            return DATA;
        }
        #endregion
        #region Rónoległobok
        public string[ ] F_Row_Load(int TYPE) {
            string[ ] Values = new string[8];
            Values[0] = "Długość (a)";
            switch (TYPE) {
                case 0:
                    Values[1] = "Długość (b)";
                    break;
                case 1:
                    Values[6] = "Wysokość (h)";
                    break;
            }
            return Values;
        }
        public string F_Row_Check(int TYPE) {
            return "";
        }
        public ImageSource F_Row_ImageX(bool TYPX, int TYPE) {
			return new BitmapImage(new Uri(@"pack://application:,,,/Resources/ImagesG/GI_Row.png", UriKind.Absolute));
        }
        public string[ ] F_Row_Ob(byte TP = 0, double A = 0, double B = 0) {
            if (A == 0) {
                A = DANE[0];
            }
            if (B == 0) {
                B = DANE[1];
            }
            DATA[0] = Strs(2 * A + 2 * B);
            DATA[1] = "Ob = 2a + 2b";
            DATA[1] = DATA[1] + "\nOb = 2•" + Strs(A) + " + 2•" + Strs(B);
            DATA[1] = DATA[1] + "\nOb = " + Strs(2 * A) + " + " + Strs(2 * B);
            DATA[1] = DATA[1] + "\nOb = " + DATA[0];
            DATA[1] = DATA[1] + "\n\n$Ob: " + DATA[0];
            return DATA;
        }
        public string[ ] F_Row_P(byte TP = 0, double A = 0, double H = 0) {
            if (A == 0) {
                A = DANE[0];
            }
            if (H == 0) {
                H = DANE[6];
            }
            DATA[0] = Strs(A * H);
            DATA[1] = "P = a•h";
            DATA[1] = DATA[1] + "\nP = " + Strs(A) + "•" + Strs(H);
            DATA[1] = DATA[1] + "\nP = " + DATA[0];
            DATA[1] = DATA[1] + "\n\n$P: " + DATA[0];
            return DATA;
        }
        #endregion
        #region Prostokąt
        public string[ ] F_Pro_Load(int TYPE) {
            string[ ] Values = new string[8];
            Values[0] = "Długość (a)";
            switch (TYPE) {
                case 0:
                    Values[1] = "Długość (b)";
                    break;
                case 1:
                    Values[6] = "Wysokość (h)";
                    break;
            }
            return Values;
        }
        public string F_Pro_Check(int TYPE) {
            return "";
        }
        public ImageSource F_Pro_ImageX(bool TYPX, int TYPE) {
			return new BitmapImage(new Uri(@"pack://application:,,,/Resources/ImagesG/GI_Pro.png", UriKind.Absolute));
        }
        public string[ ] F_Pro_Ob(byte TP = 0, double A = 0, double B = 0) {
            if (A == 0) {
                A = DANE[0];
            }
            if (B == 0) {
                B = DANE[1];
            }
            DATA[0] = Strs(2 * A + 2 * B);
            DATA[1] = "Ob = 2a + 2b";
            DATA[1] = DATA[1] + "\nOb = 2•" + Strs(A) + " + 2•" + Strs(B);
            DATA[1] = DATA[1] + "\nOb = " + Strs(2 * A) + " + " + Strs(2 * B);
            DATA[1] = DATA[1] + "\nOb = " + DATA[0];
            DATA[1] = DATA[1] + "\n\n$Ob: " + DATA[0];
            return DATA;
        }
        public string[ ] F_Pro_P(byte TP = 0, double A = 0, double H = 0) {
            if (A == 0) {
                A = DANE[0];
            }
            if (H == 0) {
                H = DANE[6];
            }
            DATA[0] = Strs(A * H);
            DATA[1] = "P = a•h";
            DATA[1] = DATA[1] + "\nP = " + Strs(A) + "•" + Strs(H);
            DATA[1] = DATA[1] + "\nP = " + DATA[0];
            DATA[1] = DATA[1] + "\n\n$P: " + DATA[0];
            return DATA;
        }
        #endregion
        #region Romb
        public string[ ] F_Rom_Load(int TYPE) {
            string[ ] Values = new string[8];
            Values[0] = "Długość (a)";
            switch (TYPE) {
                case 0:

                    break;
                case 1:
                    Values[6] = "Wysokość (h)";
                    Values[4] = "Przekątna (e)";
                    Values[5] = "Przekątna (f)";
                    break;
            }
            return Values;
        }
        public string F_Rom_Check(int TYPE) {
            return "";
        }
        public ImageSource F_Rom_ImageX(bool TYPX, int TYPE) {
			return new BitmapImage(new Uri(@"pack://application:,,,/Resources/ImagesG/GI_Rom.png", UriKind.Absolute));
        }
        public string[ ] F_Rom_Ob(byte TP = 0, double A = 0) {
            if (A == 0) {
                A = DANE[0];
            }
            DATA[0] = Strs(4 * A);
            DATA[1] = "Ob = 4•a";
            DATA[1] = DATA[1] + "\nOb = 4•" + Strs(A);
            DATA[1] = DATA[1] + "\nOb = " + DATA[0];
            DATA[1] = DATA[1] + "\n\n$Ob: " + DATA[0];
            return DATA;
        }
        public string[ ] F_Rom_P(byte TP = 0, double A = 0, double E = 0, double F = 0, double H = 0) {
            if (A == 0) {
                A = DANE[0];
            }
            if (E == 0) {
                E = DANE[4];
            }
            if (F == 0) {
                F = DANE[5];
            }
            if (H == 0) {
                H = DANE[6];
            }
            DATA[0] = Strs((E * F) / 2);
            DATA[1] = "Sposób 1\nP = a•h";
            DATA[1] = DATA[1] + "\nP = " + Strs(A) + "•" + Strs(H);
            DATA[1] = DATA[1] + "\nP = " + Strs(A * H);
            DATA[1] = DATA[1] + "\n$P: " + Strs(A * H);
            DATA[1] = DATA[1] + "\n\nSposób 2\nP = (e•f):2";
            DATA[1] = DATA[1] + "\nP = (" + Strs(E) + "•" + Strs(F) + "):2";
            DATA[1] = DATA[1] + "\nP = " + Strs(E * F) + ":2";
            DATA[1] = DATA[1] + "\nP = " + DATA[0];
            DATA[1] = DATA[1] + "\n$P: " + DATA[0];
            return DATA;
        }
        #endregion
        #region Kwadrat
        public string[ ] F_Kwa_Load(int TYPE) {
            string[ ] Values = new string[8];
            Values[0] = "Długość (a)";
            return Values;
        }
        public string F_Kwa_Check(int TYPE) {
            return "";
        }
        public ImageSource F_Kwa_ImageX(bool TYPX, int TYPE) {
			return new BitmapImage(new Uri(@"pack://application:,,,/Resources/ImagesG/GI_Kwa.png", UriKind.Absolute));
        }
        public string[ ] F_Kwa_Ob(byte TP = 0, double A = 0) {
            if (A == 0) {
                A = DANE[0];
            }
            DATA[0] = Strs(4 * A);
            DATA[1] = "Ob = 4•a";
            DATA[1] = DATA[1] + "\nOb = 4•" + Strs(A);
            DATA[1] = DATA[1] + "\nOb = " + DATA[0];
            DATA[1] = DATA[1] + "\n\n$Ob: " + DATA[0];
            return DATA;
        }
        public string[ ] F_Kwa_P(byte TP = 0, double A = 0) {
            if (A == 0) {
                A = DANE[0];
            }
            DATA[0] = Strs(Math.Pow(A, 2));
            DATA[1] = "P = a²";
            DATA[1] = DATA[1] + "\nP = " + Strs(A) + "2";
            DATA[1] = DATA[1] + "\nP = " + DATA[0];
            DATA[1] = DATA[1] + "\n\n$P: " + DATA[0];
            return DATA;
        }
        #endregion
        #region Deltoid
        public string[ ] F_Del_Load(int TYPE) {
            string[ ] Values = new string[8];
            switch (TYPE) {
                case 0:
                    Values[0] = "Długość (a)";
                    Values[1] = "Długość (b)";
                    break;
                case 1:
                    Values[4] = "Przekątna (e)";
                    Values[5] = "Przekątna (f)";
                    break;
            }
            return Values;
        }
        public string F_Del_Check(int TYPE) {
            return "";
        }
        public ImageSource F_Del_ImageX(bool TYPX, int TYPE) {
			return new BitmapImage(new Uri(@"pack://application:,,,/Resources/ImagesG/GI_BG.jpg", UriKind.Absolute));
        }
        public string[ ] F_Del_Ob(byte TP = 0, double A = 0, double B = 0) {
            if (A == 0) {
                A = DANE[0];
            }
            if (B == 0) {
                B = DANE[1];
            }
            DATA[0] = Strs(2 * A + 2 * B);
            DATA[1] = "Ob = 2a + 2b";
            DATA[1] = DATA[1] + "\nOb = 2•" + Strs(A) + " + 2•" + Strs(B);
            DATA[1] = DATA[1] + "\nOb = " + Strs(2 * A) + " + " + Strs(2 * B);
            DATA[1] = DATA[1] + "\nOb = " + DATA[0];
            DATA[1] = DATA[1] + "\n\n$Ob: " + DATA[0];
            return DATA;
        }
        public string[ ] F_Del_P(byte TP = 0, double E = 0, double F = 0) {
            if (E == 0) {
                E = DANE[4];
            }
            if (F == 0) {
                F = DANE[5];
            }
            DATA[0] = Strs((E * F) / 2);
            DATA[1] = "P = (e•f):2";
            DATA[1] = DATA[1] + "\nP = (" + Strs(E) + "•" + Strs(F) + "):2";
            DATA[1] = DATA[1] + "\nP = " + Strs(E * F) + ":2";
            DATA[1] = DATA[1] + "\nP = " + DATA[0];
            DATA[1] = DATA[1] + "\n\n$P: " + DATA[0];
            return DATA;
        }
        #endregion
        #region Elipsa
        public string[ ] F_Eli_Load(int TYPE) {
            string[ ] Values = new string[8];
            Values[0] = "Półoś (a)";
            Values[1] = "Półoś (b)";
            return Values;
        }
        public string F_Eli_Check(int TYPE) {
            return "";
        }
        public ImageSource F_Eli_ImageX(bool TYPX, int TYPE) {
			return new BitmapImage(new Uri(@"pack://application:,,,/Resources/ImagesG/GI_Eli.png", UriKind.Absolute));
        }
        public string[ ] F_Eli_Ob(byte TP = 0, double A = 0, double B = 0) {
            DATA[0] = "0";
            DATA[1] = "Brak wzoru do obliczenia.";
            return DATA;
        }
        public string[ ] F_Eli_P(byte TP = 0, double A = 0, double B = 0) {
            if (A == 0) {
                A = DANE[0];
            }
            if (B == 0) {
                B = DANE[1];
            }
            DATA[0] = Strs(A * B);
            DATA[1] = "P = abπ";
            DATA[1] = DATA[1] + "\nP = " + Strs(A) + "•" + Strs(B) + "•π";
            DATA[1] = DATA[1] + "\nP = " + DATA[0] + "π";
            DATA[1] = DATA[1] + "\n$P: " + DATA[0] + "π";
            DATA[1] = DATA[1] + "\n\nP = " + DATA[0] + "•π";
            DATA[1] = DATA[1] + "\nP ~ " + Strs(A * B * pi);
            DATA[1] = DATA[1] + "\n%P: " + Strs(A * B * pi);
            return DATA;
        }
        #endregion
        #region Koło
        public string[ ] F_Kol_Load(int TYPE) {
            string[ ] Values = new string[8];
            Values[5] = "Promień (r)";
            return Values;
        }
        public string F_Kol_Check(int TYPE) {
            return "";
        }
        public ImageSource F_Kol_ImageX(bool TYPX, int TYPE) {
			return new BitmapImage(new Uri(@"pack://application:,,,/Resources/ImagesG/GI_Kol.png", UriKind.Absolute));
        }
        public string[ ] F_Kol_Ob(byte TP = 0, double r = 0) {
            if (r == 0) {
                r = DANE[5];
            }
            DATA[0] = Strs(2 * r);
            DATA[1] = "Ob = 2πr";
            DATA[1] = DATA[1] + "\nOb = 2π•" + Strs(r);
            DATA[1] = DATA[1] + "\nOb = " + DATA[0] + "π";
            DATA[1] = DATA[1] + "\n$Ob: " + DATA[0] + "π";
            DATA[1] = DATA[1] + "\n\nOb = " + DATA[0] + "•π";
            DATA[1] = DATA[1] + "\nOb ~ " + Strs(2 * r * pi);
            DATA[1] = DATA[1] + "\n%Ob: " + Strs(2 * r * pi);
            return DATA;
        }
        public string[ ] F_Kol_P(byte TP = 0, double r = 0) {
            if (r == 0) {
                r = DANE[5];
            }
            DATA[0] = Strs(Math.Pow(r, 2));
            DATA[1] = "P = πr²";
            DATA[1] = DATA[1] + "\nP = π•" + Strs(r) + "2";
            DATA[1] = DATA[1] + "\nP = " + DATA[0] + "π";
            DATA[1] = DATA[1] + "\n$P: " + DATA[0] + "π";
            DATA[1] = DATA[1] + "\n\nP = " + DATA[0] + "•π";
            DATA[1] = DATA[1] + "\nP ~ " + Strs(Math.Pow(r, 2) * pi);
            DATA[1] = DATA[1] + "\n%P: " + Strs(Math.Pow(r, 2) * pi);
            return DATA;
        }
        #endregion
        #endregion
        #region Bryły
        #region Graniastosłup
        public string[ ] B_Gra_Load(int TYPE, int GAT) {
            string[ ] Values = new string[8];
            switch (TYPE) {
                case 1:

                    break;
                case 2:

                    break;
            }
            return Values;
        }
        public string B_Gra_Check(int TYPE, int TYPS) {
            return "";
        }
        public ImageSource B_Gra_ImageX(bool TYPX, int TYPE, int TYPS) {
			return new BitmapImage(new Uri(@"pack://application:,,,/Resources/ImagesG/GI_BG.jpg", UriKind.Absolute));
        }
        public string[ ] B_Gra_P(byte TP = 0, double A = 0, double H = 0) {

            return DATA;
        }
        public string[ ] B_Gra_V(byte TP = 0, double A = 0, double B = 0, double C = 0) {

            return DATA;
        }
        #endregion
        #region Prostopadłościan
        public string[ ] B_Pro_Load(int TYPE) {
            string[ ] Values = new string[8];
            Values[0] = "Długość (a)";
            Values[1] = "Długość (b)";
            Values[2] = "Długość (c)";
            return Values;
        }
        public string B_Pro_Check(int TYPE) {
            return "";
        }
        public ImageSource B_Pro_ImageX(bool TYPX, int TYPE) {
			return new BitmapImage(new Uri(@"pack://application:,,,/Resources/ImagesG/GI_BG.jpg", UriKind.Absolute));
        }
        public string[ ] B_Pro_P(byte TP = 0, double A = 0, double B = 0, double C = 0) {
            if (A == 0) {
                A = DANE[0];
            }
            if (B == 0) {
                B = DANE[1];
            }
            if (C == 0) {
                C = DANE[2];
            }
            DATA[0] = Strs(2 * A * B + 2 * B * C + 2 * A * B);
            DATA[1] = "P = 2ab + 2bc + 2ac";
            DATA[1] = DATA[1] + "\nP = 2•" + Strs(A) + "•" + Strs(B) + " + 2•" + Strs(B) + "•" + Strs(C) + " + 2•" + Strs(A) + "•" + Strs(C);
            DATA[1] = DATA[1] + "\nP = 2•" + Strs(A * B) + " + 2•" + Strs(B * C) + " + 2•" + Strs(A * C);
            DATA[1] = DATA[1] + "\nP = " + Strs(2 * A * B) + " + " + Strs(2 * B * C) + " + " + Strs(2 * A * B);
            DATA[1] = DATA[1] + "\n\nPole powierzchni wynosi: " + DATA[0];
            return DATA;
        }
        public string[ ] B_Pro_V(byte TP = 0, double A = 0, double B = 0, double C = 0) {
            if (A == 0) {
                A = DANE[0];
            }
            if (B == 0) {
                B = DANE[1];
            }
            if (C == 0) {
                C = DANE[2];
            }
            DATA[0] = Strs(A * B * C);
            DATA[1] = "V = abc";
            DATA[1] = DATA[1] + "\nV = " + Strs(A) + "•" + Strs(B) + "•" + Strs(C);
            DATA[1] = DATA[1] + "\nV = " + Strs(A * B) + "•" + Strs(C);
            DATA[1] = DATA[1] + "\nV = " + DATA[0];
            DATA[1] = DATA[1] + "\n\nObjętośc wynosi: " + DATA[0];
            return DATA;
        }
        #endregion
        #region Sześcian
        public string[ ] B_Sze_Load(int TYPE) {
            string[ ] Values = new string[8];
            Values[0] = "Długość (a)";
            return Values;
        }
        public string B_Sze_Check(int TYPE) {
            return "";
        }
        public ImageSource B_Sze_ImageX(bool TYPX, int TYPE) {
			return new BitmapImage(new Uri(@"pack://application:,,,/Resources/ImagesG/GI_BG.jpg", UriKind.Absolute));
        }
        public string[ ] B_Sze_P(byte TP = 0, double A = 0) {
            if (A == 0) {
                A = DANE[0];
            }
            DATA[0] = Strs(6 * Math.Pow(A, 2));
            DATA[1] = "P = 6•a²";
            DATA[1] = DATA[1] + "\nP = 6•" + Strs(A) + "²";
            DATA[1] = DATA[1] + "\nP = 6•" + Strs(Math.Pow(A, 2));
            DATA[1] = DATA[1] + "\nP = " + DATA[0];
            DATA[1] = DATA[1] + "\n\nPole powierzchni wynosi: " + DATA[0];
            return DATA;
        }
        public string[ ] B_Sze_V(byte TP = 0, double A = 0) {
            if (A == 0) {
                A = DANE[0];
            }
            DATA[0] = Strs(Math.Pow(A, 3));
            DATA[1] = "V = a³";
            DATA[1] = DATA[1] + "\nV = " + Strs(A) + "³";
            DATA[1] = DATA[1] + "\nV = " + DATA[0];
            DATA[1] = DATA[1] + "\n\nObjętośc wynosi: " + DATA[0];
            return DATA;
        }
        #endregion
        #region Czworościan
        public string[ ] B_Czw_Load(int TYPE) {
            string[ ] Values = new string[8];
            Values[0] = "Długość (a)";
            return Values;
        }
        public string B_Czw_Check(int TYPE) {
            return "";
        }
        public ImageSource B_Czw_ImageX(bool TYPX, int TYPE) {
			return new BitmapImage(new Uri(@"pack://application:,,,/Resources/ImagesG/GI_BG.jpg", UriKind.Absolute));
        }
        public string[ ] B_Czw_P(byte TP = 0, double A = 0, double H = 0) {
            DATA[0] = "";
            DATA[1] = "P = π";
            return DATA;
        }
        public string[ ] B_Czw_V(byte TP = 0, double A = 0, double B = 0, double C = 0) {
            DATA[0] = "";
            DATA[1] = "V = π";
            return DATA;
        }
        #endregion
        #region Ostrosłup
        public string[ ] B_Ost_Load(int TYPE, int GAT) {
            string[ ] Values = new string[8];
            switch (TYPE) {
                case 1:

                    break;
                case 2:

                    break;
            }
            return Values;
        }
        public string B_Ost_Check(int TYPE, int TYPS) {
            return "";
        }
        public ImageSource B_Ost_ImageX(bool TYPX, int TYPE, int TYPS) {
			return new BitmapImage(new Uri(@"pack://application:,,,/Resources/ImagesG/GI_BG.jpg", UriKind.Absolute));
        }
        public string[ ] B_Ost_P(byte TP = 0, double r = 0, double l = 0) {
            return DATA;
        }
        public string[ ] B_Ost_V(byte TP = 0, double r = 0, double hh = 0) {
            return DATA;
        }
        #endregion
        #region Stożek
        public string[ ] B_Sto_Load(int TYPE) {
            string[ ] Values = new string[8];
            Values[5] = "Długość (r)";
            switch (TYPE) {
                case 1:
                    Values[4] = "Długość (l)";
                    break;
                case 2:
                    Values[7] = "Długość (H)";
                    break;
            }
            return Values;
        }
        public string B_Sto_Check(int TYPE) {
            return "";
        }
        public ImageSource B_Sto_ImageX(bool TYPX, int TYPE) {
			return new BitmapImage(new Uri(@"pack://application:,,,/Resources/ImagesG/GI_BG.jpg", UriKind.Absolute));
        }
        public string[ ] B_Sto_P(byte TP = 0, double r = 0, double l = 0) {
            if (l == 0) {
                l = DANE[4];
            }
            if (r == 0) {
                r = DANE[5];
            }
            DATA[0] = Strs(Math.Pow(r, 2) + r * l);
            DATA[1] = "P = πr² + πrl";
            DATA[1] = DATA[1] + "\nP = π•" + Strs(r) + "² + " + Strs(r) + "•" + Strs(l) + "π";
            DATA[1] = DATA[1] + "\nP = " + Strs(Math.Pow(r, 2)) + "π + " + Strs(r) + "•" + Strs(l) + "π";
            DATA[1] = DATA[1] + "\nP = " + Strs(Math.Pow(r, 2)) + "π + " + Strs(r * l) + "π";
            DATA[1] = DATA[1] + "\nP = " + DATA[0] + "π";
            DATA[1] = DATA[1] + "\nPole powierzchni wynosi: " + DATA[0] + "π";
            DATA[1] = DATA[1] + "\n\nP = " + DATA[0] + "•π";
            DATA[1] = DATA[1] + "\nP ~ " + Strs((Math.Pow(r, 2) + r * l) * pi);
            DATA[1] = DATA[1] + "\nPole powierzchni w przybliżeniu wynosi: " + Strs((Math.Pow(r, 2) + r * l) * pi);
            return DATA;
        }
        public string[ ] B_Sto_V(byte TP = 0, double r = 0, double hh = 0) {
            if (r == 0) {
                r = DANE[5];
            }
            if (hh == 0) {
                hh = DANE[7];
            }
            DATA[0] = Strs(Math.Pow(r, 2) / 3 * hh);
            DATA[1] = "V = 1/3•πr²•H";
            DATA[1] = DATA[1] + "\nV = 1/3•π•" + Strs(r) + "²•" + Strs(hh);
            DATA[1] = DATA[1] + "\nV = 1/3•" + Strs(Math.Pow(r, 2)) + "π•" + Strs(hh);
            DATA[1] = DATA[1] + "\nV = " + Strs(Math.Pow(r, 2) / 3) + "π•" + Strs(hh);
            DATA[1] = DATA[1] + "\nV = " + DATA[0] + "π";
            DATA[1] = DATA[1] + "\nObjętość wynosi: " + DATA[0] + "π";
            DATA[1] = DATA[1] + "\n\nV = " + DATA[0] + "•π";
            DATA[1] = DATA[1] + "\nV ~ " + Strs(Math.Pow(r, 2) / 3 * hh * pi);
            DATA[1] = DATA[1] + "\nObjętość w przybliżeniu wynosi: " + Strs(Math.Pow(r, 2) / 3 * hh * pi);
            return DATA;
        }
        #endregion
        #region Walec
        public string[ ] B_Wal_Load(int TYPE) {
            string[ ] Values = new string[8];
            Values[5] = "Promień (r)";
            Values[7] = "Wysokość (H)";
            return Values;
        }
        public string B_Wal_Check(int TYPE) {
            return "";
        }
        public ImageSource B_Wal_ImageX(bool TYPX, int TYPE) {
			return new BitmapImage(new Uri(@"pack://application:,,,/Resources/ImagesG/GI_BG.jpg", UriKind.Absolute));
        }
        public string[ ] B_Wal_P(byte TP = 0, double r = 0, double hh = 0) {
            if (r == 0) {
                r = DANE[5];
            }
            if (hh == 0) {
                hh = DANE[7];
            }
            DATA[0] = Strs(Math.Pow(r, 2) * 2 + 2 * r * hh);
            DATA[1] = "P = 2πr²•2πrH";
            DATA[1] = DATA[1] + "\nP = 2π•" + Strs(r) + "² + 2•" + Strs(r) + "•" + Strs(hh) + "π";
            DATA[1] = DATA[1] + "\nP = 2•" + Strs(Math.Pow(r, 2)) + "π + 2•" + Strs(r) + "•" + Strs(hh) + "π";
            DATA[1] = DATA[1] + "\nP = " + Strs(Math.Pow(r, 2) * 2) + "π + 2•" + Strs(r * hh) + "π";
            DATA[1] = DATA[1] + "\nP = " + Strs(Math.Pow(r, 2) * 2) + "π + " + Strs(2 * r * hh) + "π";
            DATA[1] = DATA[1] + "\nP = " + DATA[0] + "π";
            DATA[1] = DATA[1] + "\nPole powierzchni wynosi: " + DATA[0] + "π";
            DATA[1] = DATA[1] + "\n\nP = " + DATA[0] + "•π";
            DATA[1] = DATA[1] + "\nP ~ " + Strs((Math.Pow(r, 2) * 2 + 2 * r * hh) * pi);
            DATA[1] = DATA[1] + "\nPole powierzchni w przybliżeniu wynosi: " + Strs((Math.Pow(r, 2) * 2 + 2 * r * hh) * pi);
            return DATA;
        }
        public string[ ] B_Wal_V(byte TP = 0, double r = 0, double hh = 0) {
            if (r == 0) {
                r = DANE[5];
            }
            if (hh == 0) {
                hh = DANE[7];
            }
            DATA[0] = Strs(Math.Pow(r, 2) * (4 / 3) * hh);
            DATA[1] = "V = πr²•H";
            DATA[1] = DATA[1] + "\nV = 4/3•π•" + Strs(r) + "²•" + Strs(hh);
            DATA[1] = DATA[1] + "\nV = 4/3•" + Strs(Math.Pow(r, 2)) + "π•" + Strs(hh);
            DATA[1] = DATA[1] + "\nV = " + Strs(Math.Pow(r, 2) * 4 / 3) + "π•" + Strs(hh);
            DATA[1] = DATA[1] + "\nV = " + DATA[0] + "π";
            DATA[1] = DATA[1] + "\nObjętość wynosi: " + DATA[0] + "π";
            DATA[1] = DATA[1] + "\n\nV = " + DATA[0] + "•π";
            DATA[1] = DATA[1] + "\nV ~ " + Strs(Math.Pow(r, 2) * 4 / 3 * hh * pi);
            DATA[1] = DATA[1] + "\nObjętość w przybliżeniu wynosi: " + Strs(Math.Pow(r, 2) * 4 / 3 * hh * pi);
            return DATA;
        }
        #endregion
        #region Kula
        public string[ ] B_Kul_Load(int TYPE) {
            string[ ] Values = new string[8];
            Values[5] = "Promień (R)";
            return Values;
        }
        public string B_Kul_Check(int TYPE) {
            return "";
        }
        public ImageSource B_Kul_ImageX(bool TYPX, int TYPE) {
			return new BitmapImage(new Uri(@"pack://application:,,,/Resources/ImagesG/GI_BG.jpg", UriKind.Absolute));
        }
        public string[ ] B_Kul_P(byte TP = 0, double r = 0) {
            if (r == 0) {
                r = DANE[5];
            }
            DATA[0] = Strs(4 * Math.Pow(r, 2));
            DATA[1] = "P = 4πr²";
            DATA[1] = DATA[1] + "\nP = 4π•" + Strs(r) + "²";
            DATA[1] = DATA[1] + "\nP = 4π•" + Strs(Math.Pow(r, 2));
            DATA[1] = DATA[1] + "\nP = " + DATA[0] + "π";
            DATA[1] = DATA[1] + "\nPole powierzchni wynosi: " + DATA[0] + "π";
            DATA[1] = DATA[1] + "\n\nP = " + DATA[0] + "•π";
            DATA[1] = DATA[1] + "\nP ~ " + Strs(4 * Math.Pow(r, 2) * pi);
            DATA[1] = DATA[1] + "\nPole powierzchni w przybliżeniu wynosi: " + Strs(4 * Math.Pow(r, 2) * pi);
            return DATA;
        }
        public string[ ] B_Kul_V(byte TP = 0, double r = 0) {
            if (r == 0) {
                r = DANE[5];
            }
            DATA[0] = Strs((4 / 3) * Math.Pow(r, 2));
            DATA[1] = "V = 4/3•πr³";
            DATA[1] = DATA[1] + "\nV = 4/3•π•" + Strs(r) + "³";
            DATA[1] = DATA[1] + "\nV = 4/3•π•" + Strs(Math.Pow(r, 2));
            DATA[1] = DATA[1] + "\nV = π•" + DATA[0];
            DATA[1] = DATA[1] + "\nObjętość wynosi: " + DATA[0] + "π";
            DATA[1] = DATA[1] + "\n\nV = " + DATA[0] + "•π";
            DATA[1] = DATA[1] + "\nV ~ " + Strs((4 / 3) * Math.Pow(r, 2) * pi);
            DATA[1] = DATA[1] + "\nObjętość w przybliżeniu wynosi: " + Strs((4 / 3) * Math.Pow(r, 2) * pi);
            return DATA;
        }
        #endregion
        #endregion
    }
}